﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;

public partial class control_Search : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected string GetSearchUrlName(params string[] Keys)
    {
        StringBuilder sbHtml = new StringBuilder();
        foreach (string itemKey in Keys)
        {
            sbHtml.Append((sbHtml.Length>0?"|":"")+"<a href=\"/search?key=" + Server.UrlEncode(itemKey) + "\" title=\"" + itemKey + "\" target=\"_blank\">" + Server.HtmlEncode(itemKey) + "</a>");
        }
        return sbHtml.ToString();
    }

    /// <summary>
    /// 查询
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        string strSearch = string.Empty;
        if (txtSearch.Text.Trim() != "请输入疾病关键词…")
            strSearch = txtSearch.Text.Trim();
        Response.Redirect("/search/?key=" + strSearch);
    }
}